set more off

local J `1'
local sigma `2'
local sigmax `3'


forvalues i = 1/`J' {
gen x_`i' = `sigmax'*rnormal()
gen z_`i' = `sigma'*rnormal()
gen epsilon_`i' = -ln(-ln(runiform())) 
gen xout_`i'=0
}

gen x_0=0
gen z_0=0
gen xout_0=1
gen epsilon_0 = -ln(-ln(runiform()))